<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="/../static/js/jquery-3.3.1.js" type="text/javascript"></script>
<script src="https://passport.cnblogs.com/scripts/jsencrypt.min.js"
	type="text/javascript"></script>
</head>
<script type="text/javascript">
	$(function() {
		var encrypt = new JSEncrypt();
	 	//encrypt.setPublicKey($("#tra").val()); 
		encrypt.setPublicKey("MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxmQRsfTVP5c/1rLR7kqtU668T96I4NrNgIgY5oWZK0dMKl+qZndVKhVyuBEHBIX/pAco8j7UQMGZj/6B/F/FM2iKXWliCAP8vhN4JezjjiMGdkCI6Y0QIfqYv3NTfTMBc8Ngf905iUgrHTs3kIuFHXFkyNZxvSM6XDbNDvroWHwIDAQAB");
		var data = encrypt.encrypt("123456789"); 
		alert(data);

	});
</script>
</head>
<body>
	<div>
		<input type="button" id="btn" value="点我" />
		<textarea id="tra" rows="15" cols="65">
        MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp0wHYbg/NOPO3nzMD3dndwS0MccuMeXCHgVlGOoYyFwLdS24Im2e7YyhB0wrUsyYf0/nhzCzBK8ZC9eCWqd0aHbdgOQT6CuFQBMjbyGYvlVYU2ZP7kG9Ft6YV6oc9ambuO7nPZh+bvXH0zDKfi02prknrScAKC0XhadTHT3Al0QIDAQAB
        </textarea>
		<hr />
		注意+好的处理
	</div>
</body>
</html>